<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.mail.vo.TjsemailReceived"%>
<%@page import="com.tjsinfo.tjsoa.mail.vo.TjsAnnex"%>
<%@page import="com.tjsinfo.tjsoa.common.DateTimeFromConver;"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>"/>
    
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>粮油集团办公自动化协作平台</title>
<link href="style/txlz7.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath %>email/js/email.js"></script>
<script>
function back()
{
	history.back(-1);
}
</script>
  </head>
  
  <body onload="ieverson()">
  <%
  		TjsemailReceived received = (TjsemailReceived)request.getAttribute("received");
  %>
   <div id="rightindex" style="height: 97%">
   <div id="mailcontent"> 
            <div id="mail_title">
                <ul>
                   
                  
                    
                </ul>
            </div>
            <div id="mail_left" style="height: 94%">
                <div class="p_01">
                    <a href="<%=basePath %>tjsinfo/tjsoa/mail/emailReceivedList.do" class="a1"><img src="images/mailicon03.gif" /></a><a href="<%=basePath %>tjsinfo/tjsoa/mail/writemailfrom.do" class="a2"><img src="images/mailicon04.gif" /></a>
                </div>
                 <h1>
                </h1>
                <div class="p_02">
                <ul>
                    <li class="l_01"><a href="<%=basePath %>tjsinfo/tjsoa/mail/emailReceivedList.do">收件箱(${count})</a></li>
                    <li class="l_05"><a href="<%=basePath %>tjsinfo/tjsoa/mail/emailWeiReadReceived.do">未读邮件</a></li>
                    <li class="l_02"><a href="<%=basePath %>tjsinfo/tjsoa/mail/emailDraftList.do">草稿箱</a></li>
                    <li class="l_03"><a href="<%=basePath %>tjsinfo/tjsoa/mail/selectEmaiList.do">已发送</a></li>
                    <li class="l_04"><a href="<%=basePath %>tjsinfo/tjsoa/mail/deleteEmaiList.do">已删除</a></li>
                     <c:forEach var="fold" items="${foldlist}">
                    <li class="l_05"><a href="<%=basePath %>tjsinfo/tjsoa/mail/selectfoldemail.do?id=${fold.folderId}">${fold.folderName}</a></li>
                    </c:forEach>
                </ul>
                </div>
                <div class="p_03">
                    
                    <div class="s01">
                      <table width="100%" border="0" cellspacing="0">
                        <tr>
                          <td height="25"></td>
                        </tr>
                        <tr>
                          <td height="25"></td>
                        </tr>
                        <tr>
                          <td height="25"></td>
                        </tr>
                      </table>
                    </div>
                </div>
            </div>
            <div id="mail_right">
             <div class="p_11" style="width:99%">
                <ul>
                    <li class="s01"><a href="javascript:back()">返回</a></li>
                    <li class="s02"><a href="<%=basePath %>tjsinfo/tjsoa/mail/backMailFrom.do?id=<%=received.getTjsmail().getTjsmailId() %>">回复</a></li>
                    <li class="s03"><a href="<%=basePath %>tjsinfo/tjsoa/mail/forwordMailFrom.do?id=<%=received.getTjsmail().getTjsmailId() %>">转发</a></li>
                    <li class="s04"><a href="javascript:deleteform1.submit();">删除</a></li>
                </ul>
                <div class="page111"></div>
	          </div>
              <div class="p_09">
                <div class="p_09_1">
                    <h2><%=received.getTjsmail().getTjsmailTitle() %></h2>
                    <table width="100%" border="0">
                    <tr>
                    <th width="7%">发件人：</th>
                    <td width="93%"><%=received.getTjsmail().getTjsmailUsername() %></td>
                    </tr>
                    <tr>
                      <th>收件人：</th>
                      <td>
                      <c:forEach var="entity" items="${List }">
                             ${entity.recUsername };
                      </c:forEach>
<%--                      	<%--%>
<%--                      	Iterator entity = List.iterator();--%>
<%--                      	while(entity.hasNext())--%>
<%--                      	{--%>
<%--                      		TjsemailReceived tjsemailReceived = (TjsemailReceived)entity.next();--%>
<%--                      %>--%>
<%--                     <%=tjsemailReceived.getRecUsername() +"&nbsp;"%>--%>
<%--                      <% 		--%>
<%--                      	}--%>
<%--                      %>--%>
                      </td>
                    </tr>
                    <tr>
                      <th>日&nbsp;&nbsp;期：</th>
                      <td><strong ><%=DateTimeFromConver.strdatetimeto(received.getTjsmail().getTjsmailDatatime()) %></strong></td>
                    </tr>
                    <tr>
                      <th class="fj">附&nbsp;&nbsp;件：</th>
                      <style>
                      .fj{
                    	  padding-bottom: 20px;
                      }
                      </style>
                      <td>
                      	<table>
                      		<tr>
                      		<td >
                      			 <%
                      		Iterator iterator = received.getTjsmail().getTjsAnnexes().iterator();
                      		while(iterator.hasNext())
                      		{
                      			TjsAnnex tjsAnnex = (TjsAnnex)iterator.next();	
                      			
                      			
                      %>
                      		<a href="<%=basePath%>tjsinfo/tjsoa/mail/emailAnnexIOAction.do?id=<%=tjsAnnex.getAnnexId() %>" target="_blank"><span class="f12_blue01"><%=tjsAnnex.getAnnexZhenName() %>(<%=tjsAnnex.getAnnexSize() %>KB)</span></a><br/>
                      <% 				
                      		}	
                      %>
                      		</td>
                      		</tr>
                      	</table>
                      </td>
                     
                      
                    </tr>
                  </table>
                </div>
                <div class="p_09_2"><%=received.getTjsmail().getTjsmailValue() %></div>
            </div>
            </div>
   </div>
</div>
<form action="<%=basePath %>tjsinfo/tjsoa/mail/deleteEmailReceived.do" name="deleteform1" method="post">
	<input  type="checkbox" name="checkbox2" value="<%=received.getRecId()%>" checked="checked" style="display: none"/>
</form>
  </body>
</html>
